﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Shape
    {
        protected String _color;

        public string color
        {
            get { return this._color; }
            set { this._color = value; }
        }
        public virtual void GetArea()
        {
            Console.WriteLine("输入边长或者半径的值");
        }
    }

    class Circle : Shape
    {
        protected int _radius;
        
        public int radius
        {
            get { return this._radius; }
            set { this._radius = value; }
        }
        public override void GetArea()
        {
            base.GetArea();
            radius= int.Parse(Console.ReadLine());
            Console.WriteLine("面积为"+ (radius*3.14));
        }
    }
    class Square : Shape
    {
        protected int _sideLen;
        public int sideLen
        {
            get { return this._sideLen; }
            set { this._sideLen = value; }
        }
        public override void GetArea()
        {
            base.GetArea();
            sideLen= int.Parse(Console.ReadLine());
            Console.WriteLine("面积为" + (sideLen*sideLen));
        }
    }
}
